#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <windows.h>
class QImage;
class QTimer;

namespace Ui
{
    class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT
public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();

protected:
    void changeEvent(QEvent *e);

private slots:
    void onTimeout();

private:
    Ui::Dialog *ui;

    HANDLE m_deviceHandle;
    uchar * m_imageBuffer;
    ulong m_bufferLength;
    QImage * m_image;
    QTimer * m_timer;
};

#endif // DIALOG_H
